package com.cloudeasy.provider.service;

import com.cloudeasy.core.model.dto.GlobalExceptionLogDto;
import com.cloudeasy.provider.service.hystrix.MdcExceptionLogFeignHystrix;
import com.cloudeasy.security.feign.OAuth2FeignAutoConfiguration;
import com.cloudeasy.wrapper.Wrapper;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * Create By 郭金宝 on 2019/1/16.<br>
 */
@FeignClient(value = "cloudeasy-provider-mdc", configuration = OAuth2FeignAutoConfiguration.class, fallback = MdcExceptionLogFeignHystrix.class)
public interface MdcExceptionLogFeignApi {

    /**
     * Update product stock by id int.
     *
     * @param exceptionLogDto the exception log dto
     *
     * @return the int
     */
    @PostMapping(value = "/api/exception/saveAndSendExceptionLog")
    Wrapper saveAndSendExceptionLog(@RequestBody GlobalExceptionLogDto exceptionLogDto);
}

